<?php
function add_vehicle_details_form()
	{
	$FormSubmitted = $_POST['FormSubmitted'];

	$NoReplyEmail = 'do-not-reply@wedding-car-hire.com';

	if (isset($FormSubmitted)) // ($_SERVER['REQUEST_METHOD'] == "POST")
		{


		/* Stripping whitespaces from left and right sides of all posted data.
		 * Put this before working with posted data.
		 *
		*/

		// Remove whitespaces from left and right sides.
		function removeSpaces($str)
			{
			$newStr = stripslashes(ucwords(strtolower(strip_tags(htmlentities(trim($str))))));
			return $newStr;
			}

		// If any data posted to the page, send them for trimming.
		if ($_POST)
			{
			foreach ($_POST as $var => $value)
				{
				$value = removeSpaces($value);
				$_POST[$var] = $value;
				}
			}

		$FormErrors = FALSE; // No Errors so Far.

		//  Persons That Shall Receive This Emailed Form

		$email_form_to = 'vehicle-supplier@wedding-car-hire.com';
		$email_backup_to = 'theweddingcarhirecompany@yahoo.co.uk';

		//  Subject Header for Email

		$subject = 'Vehicle Listing Request';


		// FUNCTION TO HANDLE NAMES

		function fixname($name)
			{
			// SPECIAL CASES FOR UPPER OR LOWER CASE DISPOSITION
			$uc = array // UPPERCASE AFTER ANY OF THESE
				(
				" Mc",
				"'",
				"-"
				);

			$lc = array // ALWAYS LOWER CASE
			("Van De ");

			$mc = array // ALWAYS UPPER CASE
			('Iii');

			// REMOVE UNNECESSARY BLANKS
			$name = preg_replace('/\s\s+/', ' ', $name);

			// START WITH LOWER CASE AND UPPER FIRST
			$name = strtolower($name);
			$name = ucwords($name);

			// CHECK FOR KNOWN SPECIAL UPPER-CASES
			foreach ($uc as $dlm)
				{
				// FIX THE Mcdonald EXAMPLE, ETC
				$namex = explode($dlm, $name);

				foreach ($namex as $k => $v)
					{
					$namex[$k] = ucwords($v);
						}
				$name = implode($dlm, $namex);
				}

			// CHECK FOR KNOWN CONSTANT LOWER-CASES
			foreach ($lc as $dlm)
				{
				// FIX THE van de Graaff EXAMPLE
				$name = str_replace($dlm, strtolower($dlm), $name);
					}

			// CHECK FOR KNOW CONSTANT UPPERCASE
			foreach ($mc as $dlm)
				{
				// FIX THE Bush, III EXAMPLE
				$name = str_replace($dlm, strtoupper($dlm), $name);
					}
			// RETURN THE REPAIRED STRING
			return $name;
			}


		//  Your Details Section
		//  Your Name Panel

		$VehicleOwnerFirstName = fixname(($_POST['VehicleOwnerFirstName']));

		If (empty($VehicleOwnerFirstName))
			{
			$FormErrors = TRUE;
			}

		$VehicleOwnerLastName = fixname($_POST['VehicleOwnerLastName']);

		If (empty($VehicleOwnerLastName))
			{
			$FormErrors = TRUE;
			}

		//  Your Address Panel

		$VehicleOwnerAddress1 = fixname($_POST['VehicleOwnerAddress1']);
		$VehicleOwnerAddress2 = $_POST['VehicleOwnerAddress2'];

		$VehicleOwnerAddress3 = $_POST['VehicleOwnerAddress3'];

		if (empty($VehicleOwnerAddress3))
			{
			$FormErrors = TRUE;
			}

		$VehicleOwnerAddress4 = $_POST['VehicleOwnerAddress4'];

		if (empty($VehicleOwnerAddress4))
			{
			$FormErrors = TRUE;
			}
		$VehicleOwnerAddress5 = $_POST['VehicleOwnerAddress5'];

		if (empty($VehicleOwnerAddress5))
			{
			$FormErrors = TRUE;
			}
		$VehicleOwnerAddress6 = strtoupper($_POST['VehicleOwnerAddress6']);

		if (empty($VehicleOwnerAddress6))
			{
			$FormErrors = TRUE;
			}
		// Telephone - This is You Not Your Business Panel

		$VehicleOwnerTelephoneLand = $_POST['VehicleOwnerTelephoneLand'];
		$VehicleOwnerTelephoneMobile = $_POST['VehicleOwnerTelephoneMobile'];

		//  Business Details Secrion
		//  Business Contact

		$BusinessName = fixname($_POST['BusinessName']);

		if (empty($BusinessName))
			{
			$FormErrors = TRUE;
			}
		$BusinessWebsite = strtolower($_POST['BusinessWebsite']);

		if (empty($BusinessWebsite))
			{
			$FormErrors = TRUE;
			}
		$BusinessEmail = strtolower($_POST['BusinessEmail']);

		if (empty($BusinessEmail))
			{
			$FormErrors = TRUE;
			}

		//  Business Dropdown Panel

		$BusinessDifferent = $_POST['chkBusinessDifferent'];

		//  Business Details id Different

		if (!isset($BusinessDifferent))
			{
			$BusinessAddress1 = $VehicleOwnerAddress1;
			$BusinessAddress2 = $VehicleOwnerAddress2;
			$BusinessAddress3 = $VehicleOwnerAddress3;
			$BusinessAddress4 = $VehicleOwnerAddress4;
			$BusinessAddress5 = $VehicleOwnerAddress5;
			$BusinessAddress6 = $VehicleOwnerAddress6;
			$BusinessTelephoneLand = $VehicleOwnerTelephoneLand;
			$BusinessTelephoneMobile = $VehicleOwnerTelephoneMobile;
			}

		$BusinessAddress1 = $_POST['BusinessAddress1'];
		$BusinessAddress2 = $_POST['BusinessAddress2'];
		$BusinessAddress3 = $_POST['BusinessAddress3'];
		$BusinessAddress4 = $_POST['BusinessAddress4'];
		$BusinessAddress5 = $_POST['BusinessAddress5'];
		$BusinessAddress6 = $_POST['BusinessAddress6'];
		$BusinessTelephoneLand = $_POST['BusinessTelephoneLand'];
		$BusinessTelephoneMobile = $_POST['BusinessTelephoneMobile'];

		if ((empty($VehicleOwnerTelephoneLand)) && (empty($VehicleOwnerTelephoneMobile))
			&& (empty($BusinessTelephoneLand)) && (empty($BusinessTelephoneMobile)))
			{
			$FormErrors = TRUE;
			$NoTelephoneNumberSupplied = 'You Have Not Supplier Any Telephone Numbers';
			}

		//  Vehicle Your are Listing Section
		//  Vehicle Basics

		$VehicleManufacturer = $_POST['VehicleManufacturer'];

		if (empty($VehicleManufacturer))
			{
			$FormErrors = TRUE;
			}
		$VehicleModel = $_POST['VehicleModel'];

		if (empty($VehicleModel))
			{
			$FormErrors = TRUE;
			}

		$VehicleYear = $_POST['VehicleYear'];

		if (empty($VehicleYear))
			{
			$FormErrors = TRUE;
			}
		$VehicleRegistration = strtoupper($_POST['VehicleRegistration']);

		$VehicleExteriorColour = $_POST['VehicleExteriorColour'];

		if (empty($VehicleExteriorColour))
			{
			$FormErrors = TRUE;
			}
		$VehicleInteriorColour = $_POST['VehicleInteriorColour'];

		if (empty($VehicleInteriorColour))
			{
			$FormErrors = TRUE;
			}
		$VehicleInteriorMaterial = $_POST['VehicleInteriorMaterial'];

		if (empty($VehicleInteriorMaterial))
			{
			$FormErrors = TRUE;
			}
		$VehiclePassengerSeats = $_POST['VehiclePassengerSeats'];

		if (empty($VehiclePassengerSeats))
			{
			$FormErrors = TRUE;
			}

		$VehicleseatBelts = $_POST['VehicleseatBelts'];

		if (empty($VehicleseatBelts))
			{
			$FormErrors = TRUE;
			}
		//  Vehicle Description Panel

		$VehicleDescription = ucfirst(strtolower($_POST['VehicledDescription']));

		if (isset($VehicleDescription))
			$TextAreaText = $VehicleDescription;
		else
			$TextAreaText = NULL;

		if (empty($VehicleDescription))
			{
			$FormErrors = TRUE;
			}

		//  Service Offered Panel

		$VehicleBasedWhere = $_POST['VehicleBasedWhere'];

		if (empty($VehicleBasedWhere))
			{
			$FormErrors = TRUE;
			}
		$VehicleViewingWhere = $_POST['VehicleViewingWhere'];

		if (empty($VehicleViewingWhere))
			{
			$FormErrors = TRUE;
			}
		$VehicleWorkingRadius = $_POST['VehicleWorkingRadius'];

		if (empty($VehicleWorkingRadius))
			{
			$FormErrors = TRUE;
			}
		$WeekendRatesFrom = $_POST['WeekendRatesFrom'];

		if (empty($WeekendRatesFrom))
			{
			$FormErrors = TRUE;
			}
		$WeekdayRatesFrom = $_POST['WeekdayRatesFrom'];

		if (empty($WeekdayRatesFrom))
			{
			$FormErrors = TRUE;
			}
		$OffPeakRatesFrom = $_POST['OffPeakRatesFrom'];

		if (empty($OffPeakRatesFrom))
			{
			$FormErrors = TRUE;
			}

		$ChampagneService = $_POST['ChampagneService'];

		if (empty($ChampagneService))
			{
			$FormErrors = TRUE;
			}
		$ChauffeurAttire = $_POST['ChauffeurAttire'];

		if (empty($ChauffeurAttire))
			{
			$FormErrors = TRUE;
			}

		$ErrorMessageBasic = 'You Have Errors in Your Submission - Please See the Areas Marked in Red Below Below';

		//  Available For Hire Section
		//  License Panel

		$HireLicenceNone = $_POST['HireLicenceNone'];
		$HireLicencePsv = $_POST['HireLicencePsv'];
		$HireLicencePrivateHire = $_POST['HireLicencePrivateHire'];
		$HireLicenceOther = $_POST['HireLicenceOther'];

		$HireLicenceCheck = 0;

		if ($HireLicenceNone)
			$HireLicenceCheck++;

		if ($HireLicencePsv)
			$HireLicenceCheck++;

		if ($HireLicencePrivateHire)
			$HireLicenceCheck++;

		if ($HireLicenceOther)
			$HireLicenceCheck++;

		if ($HireLicenceCheck < 1)
			{
			$HireLicenceCheckError = TRUE;
			$FormErrors = TRUE;
			}
		else { //----> CHECK input
		}


		//  Work Type Panel

		$HireForWedding = $_POST['HireForWedding'];
		$HireForPromo = $_POST['HireForPromo'];
		$HireForFilm = $_POST['HireForFilm'];
		$HireForOther = $_POST['HireForOther'];

		$HireForPurposeCheck = 0;

		if ($HireForWedding)
			$HireForPurposeCheck++;

		if ($HireForPromo)
			$HireForPurposeCheck++;

		if ($HireForFilm)
			$HireForPurposeCheck++;

		if ($HireForOther)
			$HireForPurposeCheck++;

		if ($HireForPurposeCheck < 1)
			{

			$HireForPurposeCheckError = TRUE;
			$FormErrors = TRUE;
			}
		else { //----> CHECK input
		}


		//  Counties Panel
		//  England South East

		$HireInBeds = $_POST['HireInBeds'];
		$HireInBerks = $_POST['HireInBerks'];
		$HireInBucks = $_POST['HireInBucks'];
		$HireInCamb = $_POST['HireInCamb'];
		$HireInEastSussex = $_POST['HireInEastSussex'];
		$HireInEssex = $_POST['HireInEssex'];
		$HireInHants = $_POST['HireInHants'];
		$HireInHerts = $_POST['HireInHerts'];
		$HireInKent = $_POST['HireInKent'];
		$HireInLondon = $_POST['HireInLondon'];
		$HireInNorfolk = $_POST['HireInNorfolk'];
		$HireInOxon = $_POST['HireInOxon'];
		$HireInSuffolk = $_POST['HireInSuffolk'];
		$HireInSurrey = $_POST['HireInSurrey'];
		$HireInWestSussex = $_POST['HireInWestSussex'];

		//  Counties Other

		$HireInOther = $_POST['HireInOther'];

		$HireInCountiesCheck = 0;

		if ($HireInBeds)
			$HireInCountiesCheck++;

		if ($HireInBerks)
			$HireInCountiesCheck++;

		if ($HireInBucks)
			$HireInCountiesCheck++;

		if ($HireInCamb)
			$HireInCountiesCheck++;

		if ($HireInEastSussex)
			$HireInCountiesCheck++;

		if ($HireInEssex)
			$HireInCountiesCheck++;

		if ($HireInHants)
			$HireInCountiesCheck++;

		if ($HireInHerts)
			$HireInCountiesCheck++;

		if ($HireInKent)
			$HireInCountiesCheck++;

		if ($HireInLondon)
			$HireInCountiesCheck++;

		if ($HireInNorfolk)
			$HireInCountiesCheck++;

		if ($HireInOxon)
			$HireInCountiesCheck++;

		if ($HireInSuffolk)
			$HireInCountiesCheck++;

		if ($HireInSurrey)
			$HireInCountiesCheck++;

		if ($HireInWestSussex)
			$HireInCountiesCheck++;

		if ($HireInOther)
			$HireInCountiesCheck++;

		if ($HireInCountiesCheck < 1)
			{
			$HireInCountiesCheckError = TRUE;
			$FormErrors = TRUE;
			}
		else { //----> CHECK input
		}

		$ImageFile01 = $_FILES['ImageFile01']['name'];
		$ImageFile02 = $_FILES['ImageFile02']['name'];
		$ImageFile03 = $_FILES['ImageFile03']['name'];
		$ImageFile04 = $_FILES['ImageFile04']['name'];
		$ImageFile05 = $_FILES['ImageFile05']['name'];
		$ImageFile06 = $_FILES['ImageFile06']['name'];
		$ImageFile07 = $_FILES['ImageFile07']['name'];
		$ImageFile08 = $_FILES['ImageFile08']['name'];
		$ImageFile09 = $_FILES['ImageFile09']['name'];
		$ImageFile10 = $_FILES['ImageFile10']['name'];

		$ImageUploadCountCheck = 0;

		if ($ImageFile01)
			$ImageUploadCountCheck++;

		if ($ImageFile02)
			$ImageUploadCountCheck++;

		if ($ImageFile03)
			$ImageUploadCountCheck++;

		if ($ImageFile04)
			$ImageUploadCountCheck++;

		if ($ImageFile05)
			$ImageUploadCountCheck++;

		if ($ImageFile06)
			$ImageUploadCountCheck++;

		if ($ImageFile07)
			$ImageUploadCountCheck++;

		if ($ImageFile08)
			$ImageUploadCountCheck++;

		if ($ImageFile09)
			$ImageUploadCountCheck++;

		if ($ImageFile10)
			$ImageUploadCountCheck++;

		if ($ImageUploadCountCheck < 4)
			{

			$ImageUploadCountCheckError = TRUE;
			$FormErrors = TRUE;
			}
		else { //----> CHECK input
		}


		//  End Select Counties Section

		// Image Upload Section
		$AllowedExtensions = array
			(
			"jpg",
			"jpeg"
			);
		//  End Image Upload Section

		//  Site Improvement Section
		//  Comment From Vehicle Owners

		$VehicleSupplierComment = $_POST['VehicleSupplierComments'];

		//  Comments About Customer Section

		$VehicleCustomerComments = $_POST['VehicleCustomerComments'];

		//  Add Anothe Vehicle Section
		//  Add Another Vehicle Check Box

		$AddAnotherVehicle = $_POST['AddAnotherVehicle'];


		// get the sender's name and email address
		// we'll just plug them a variable to be used later
		$from =
			stripslashes($_POST['VehicleOwnerFirstName']) . " " . stripslashes($_POST['VehicleOwnerLastName']) . " - "
			. stripslashes($_POST['BusinessName']) . "<" . stripslashes($_POST['BusinessEmail']) . ">";

		// generate a random string to be used as the boundary marker
		$mime_boundary = "==Multipart_Boundary_x" . md5(mt_rand()) . "x";

		// now we'll build the message headers

		$headers = "MIME-Version: 1.0" . "\r\n";
		$headers .= "Content-type:multipart/mixed;boundary=\"{$mime_boundary}\"" . "\r\n";
		$headers .= "From:" . $from . "\r\n";
		$headers .= "Cc:" . $email_backup_to . "\r\n";


		// $headers = "From: $from\r\n" .
		// "MIME-Version: 1.0\r\n" .
		// "Content-Type: multipart/mixed;\r\n" .
		// " boundary=\"{$mime_boundary}\"";


		// here, we'll start the message body.
		// this is the text that will be displayed
		// in the e-mail

		//  Body of the Email Message Sent to The Wedding Car Hire Company

		$message = "Your Details Section \n\nApplicant Name:\n"
			. $VehicleOwnerFirstName . " " . $VehicleOwnerLastName . ".\n\nApplicant Address: \n"
			. $VehicleOwnerAddress1 . " " . $VehicleOwnerAddress2 . " " . $VehicleOwnerAddress3 . " "
			. $VehicleOwnerAddress4 . " " . $VehicleOwnerAddress5 . " " . $VehicleOwnerAddress6
				. ".\n\nContact Telephone Numbers:\nLand Line: " . $VehicleOwnerTelephoneLand . " - Mobile: "
			. $VehicleOwnerTelephoneMobile . ".\n\nBusiness Details:\nBusiness Name: " . $BusinessName . " - Domain: "
			. $BusinessWebsite . " - Email: " . $BusinessEmail . "\n\nBusiness Address if Different:\n"
			. $BusinessAddress1 . " " . $BusinessAddress2 . " " . $BusinessAddress3 . " " . $BusinessAddress4 . " "
			. $BusinessAddress5 . " " . $BusinessAddress6 . "\n\nTelephone Numbers:\nLand: "
			. $BusinessTelephoneLand . " - Mobile: " . $BusinessTelephoneMobile . "\n\nVehicle Details:\nMaker: "
			. $VehicleManufacturer . " - Model: " . $VehicleModel . " - Year: " . $VehicleYear . " - Reg Number: "
			. $VehicleRegistration . "\nExterior Colour: " . $VehicleExteriorColour . " - Interior Colour: "
			. $VehicleInteriorColour . " - Interior Fabric: " . $VehicleInteriorMaterial . " - Passenger Seats: "
			. $VehiclePassengerSeats . " - Seat Belts: " . $VehicleseatBelts . "\n\n" . "Vehicle Description:\n"
			. $VehicleDescription . "\n\nServices Offer with Vehicle:\nBased Where: " . $VehicleBasedWhere
				. " - View Area: " . $VehicleViewingWhere . " - Working Radius: " . $VehicleWorkingRadius
				. "\n\nCharging Rates:\nWeekend From: " . $WeekendRatesFrom . " - Weekday From: " . $WeekdayRatesFrom
				. " - Off Peak From: " . $OffPeakRatesFrom . " - Champagne Service: " . $ChampagneService
				. " - Vehicle Driver: "
			. $ChauffeurAttire . "\n\nLicence Details:\n" . $HireLicenceNone . " - " . $HireLicencePsv . " - "
			. $HireLicencePrivateHire . " - " . $HireLicenceOther . "\n\nHire For\n" . $HireForWedding . " - "
			. $HireForPromo . " - " . $HireForFilm . " - " . $HireForOther
				. "\n\nAreas of Hire:\nCounties South East England:\n" . $HireInBeds . " - " . $HireInBerks . " - "
			. $HireInBucks . " - " . $HireInCamb . " - " . $HireInEastSussex . " - "
			. $HireInEssex . " - " . $HireInHants . " - "
			. $HireInHerts . " - " . $HireInKent . " - " . $HireInLondon . " - " . $HireInNorfolk . " - " . $HireInOxon
				. " - " . $HireInSuffolk . " - " . $HireInSurrey . " - " . $HireInWestSussex . "\n\nCounties Other:\n"
			. $HireInOther . "\n\nComments From Supplier - As a Supplier:\n"
			. $VehicleSupplierComments . "\n\nComments From Supplier - As a Potential Client:\n"
			. $VehicleCustomerComments . '.';

		$EmailToApplicant =
			"This is an automated response from The Wedding Car Hire Company and should not be replied to.\n\nThank you "
			. $VehicleOwnerFirstName . " " . $VehicleOwnerLastName
				. " for requesting that we include your vehicle on The Wedding Car Hire Company website.\n\nWe shall deal with this request very soon and potentially list on behalf of "
			. $BusinessName . " a " . $VehicleManufacturer . " " . $VehicleModel
				. " where the listing reference for this vehicle shall be the vehicle registration number in reverse \n\nShould you need to contact us in the future with regards to this listing, the vehicle reference should be quoted in all correspondence.";


		// next, we'll build the invisible portion of the message body
		// note that we insert two dashes in front of the MIME boundary
		// when we use it

		$message = "This is a multi-part message in MIME format.\n\n" .
			"--{$mime_boundary}\n" .
			"Content-Type: text/plain; charset=\"iso-8859-1\"\n" .
			"Content-Transfer-Encoding: 7bit\n\n" . $message . "\n\n";

		// now we'll process our uploaded files


		// store the file information to variables for easier access

		foreach ($_FILES as $userfile)
			{
			$tmp_name = $userfile['tmp_name'];

			{if ($userfile['tmp_name'] > '')
				{
				if (!in_array(end(explode(".", strtolower($userfile['name']))), $AllowedExtensions))
					{
					echo
						'<fieldset><legend>The Following Non Jpeg File Will Not Be Included</legend><fieldset><legend>File Reference</legend>'
						. $userfile['name'] . '<br/></fieldset></fieldset>';
					}
				} }

			$tmp_name = $userfile['tmp_name'];
			$type = $userfile['type'];
			$name = $userfile['name'];
			$size = $userfile['size'];

			// if the upload succeded, the file will exist
			if (file_exists($tmp_name) AND (in_array(end(explode(".", strtolower($userfile['name']))),
				$AllowedExtensions)))
				{

				// check to make sure that it is an uploaded file and not a system file
				if (is_uploaded_file($tmp_name))
					{

					// open the file for a binary read
					$file = fopen($tmp_name, 'rb');

					// read the file content into a variable
					$data = fread($file, filesize($tmp_name));

					// close the file
					fclose($file);

					// now we encode it and split it into acceptable length lines
					$data = chunk_split(base64_encode($data));
					}

				// now we'll insert a boundary to indicate we're starting the attachment
				// we have to specify the content type, file name, and disposition as
				// an attachment, then add the file content.
				// NOTE: we don't set another boundary to indicate that the end of the
				// file has been reached here. we only want one boundary between each file
				// we'll add the final one after the loop finishes.
				$message .= "--{$mime_boundary}\n" .
					"Content-Type: {$type};\n" .
					" name=\"{$name}\"\n" .
					"Content-Disposition: attachment;\n" .
					" filename=\"{$fileatt_name}\"\n" .
					"Content-Transfer-Encoding: base64\n\n" . $data . "\n\n";
				}
			}
		// here's our closing mime boundary that indicates the last of the message
		$message .= "--{$mime_boundary}--\n";

		// now we just send the message

		if ($FormErrors == FALSE)
			{
			if (@mail($email_form_to, $subject, $message, $headers))
				{

				@mail($BusinessEmail, $subject, $EmailToApplicant, "From: $NoReplyEmail"); //  Email Sent to Applicant.
?>

			<fieldset>
				<legend>
					Vehicle Submission By

					<?php print $VehicleOwnerFirstName . " " . $VehicleOwnerLastName . " of " . $BusinessName; ?>
				</legend>

				<fieldset>
					<legend class = "greenRequiredText">
						The Previous Vehicle Submitted was as Follows
					</legend>

					<div style = "margin-left: 2em">
						<p><?php print '<font color=green>Manufacturer is ' . $VehicleManufacturer . '</font>'; ?></p>
						<p><?php print '<font color = green>Model is ' . $VehicleModel . '</font>'; ?></p>
						<p><?php print '<font color = green>Year is ' . $VehicleYear . '</font>'; ?></p>
						<p>
					</div>

				<?php
				if (isset($AddAnotherVehicle))
					{
					print
						'<div style = "margin-left: 2em"><font color = "red">You May Now Add Another Vehicle Should You Wish to Do So.</font></div></p>';
					}
				else
					{
					print
						'<div style = "margin-left: 2em"><font color=green>Thank You For Your Vehicle Inclusion Request. We Shall Deal With This Very Soon. You are Welcome to Add Additional Vehicles Either Now or in the Future. You Should Receive a Confirmation that We are Dealing with Your Vehicle Addition Request.</div>';
					}
				?>

				</p>
				</fieldset>
			</fieldset>

				<?php

				//  If the Form was Completed without Problem, Unset Secondary Information.
				//  Basic Vehicle Details Section

				unset($VehicleManufacturer);
				unset($VehicleModel);
				unset($VehicleYear);
	//            unset($VehicleRegistration);
				unset($VehicleExteriorColour);
				unset($VehicleInteriorColour);
				unset($VehicleInteriorMaterial);
				unset($VehiclePassengerSeats);
				unset($VehicleseatBelts);

				//  Vehicle Description

				unset($VehicleDescription);
				unset($TextAreaText);

				//  Services Offered with Vehicle Section

				unset($VehicleBasedWhere);
				unset($VehicleViewingWhere);
				unset($VehicleWorkingRadius);
				unset($WeekendRatesFrom);
				unset($WeekdayRatesFrom);
				unset($OffPeakRatesFrom);
				unset($ChampagneService);
				unset($ChauffeurAttire);

				//  Hire License Type

				unset($HireLicenceNone);
				unset($HireLicencePsv);
				unset($HireLicencePrivateHire);
				unset($HireLicenceOther);

				//  Hireable For

				unset($HireForWedding);
				unset($HireForPromo);
				unset($HireForFilm);
				unset($HireForOther);

				//  Hire in Counties

				unset($HireInBeds);
				unset($HireInBerks);
				unset($HireInBucks);
				unset($HireInCamb);
				unset($HireInEastSussex);
				unset($HireInEssex);
				unset($HireInHants);
				unset($HireInHerts);
				unset($HireInKent);
				unset($HireInLondon);
				unset($HireInNorfolk);
				unset($HireInOxon);
				unset($HireInSuffolk);
				unset($HireInSurrey);
				unset($HireInWestSussex);
				unset($HireInOther);

				//  Comments From Suppliers Section

				unset($VehicleSupplierComment);
				unset($VehicleCustomerComments);

				//  Error Checks

				unset($FormErrors);
				unset($HireLicenceCheckError);
				unset($HireForPurposeCheckError);
				unset($HireInCountiesCheckError);
				unset($ImageUploadCountCheckError);
				}
			else
				{
				echo "Failed to send";
				}
			}
		}

	if (!$_POST['FormSubmitted'] || $_POST['AddAnotherVehicle'] || $FormErrors == TRUE)
		{
		if ($FormErrors == TRUE)
			{
			echo
				'<fieldset><fieldset id = "formErrorField"> <legend class = "formErrorLegend">Form Completion Errors</legend><fieldset id = "formErrorMessageSection"><legend class = "formErrorLegendInner">The Following Areas Need to Be Rectified</legend><div style = "margin-left: 2em"><font color=red><p>
				Any Area Mark in Red Below. This Error May Require You to Upload Your Images Again.</p></font></div></fieldset></fieldset>';
			}
				?>


		<!-- Complete Form to Submit Vehicle Details -->

		<div id = "VehicleInclusionForm">
			<form action = "" method = "post" enctype = "multipart/form-data" name = "VehicleSubmitForm"
				id = "VehicleSubmitForm"
				onsubmit = "return validateForm() && validateFormCheckBoxes() && validateFormHireForWhat() && validateFormCheckHireIn() && checkFileUploads()"> <!--- Post Action MUST be BLANK for WordPress -->
				<fieldset class = "formOuterDetailFieldset">
					<legend class = "formFieldLegendMaster">
						Details Required to Add One or More Vehicles
					</legend>
					<!-- Vehicle Owner Details Section -->
					<fieldset class = "formOuterDetailFieldset">
						<legend class = "formFieldLegendBlue">
							Your Details
						</legend>
						<!-- Vehicle Owner Name Section -->
						<fieldset class = "formInnerDetailFieldset">
							<legend class = "formLegendRed">
								Your Name
							</legend>

							<fieldset>
								<p>
								Please enter your full name. This is not displayed on 'The Wedding Car Hire Company'
								website. It is only used should we pass business your way or contact you for other
								reasons.</p>

								<br />
							</fieldset>

							<div class = "formInputRedText">
								<input type = "text" name = "VehicleOwnerFirstName" id = "VehicleOwnerFirstName"
									value = "<?php if (isset($VehicleOwnerFirstName)) {print $VehicleOwnerFirstName ;}?>"
										align = 'left' size = '30' maxlength = '20'
									title = 'Please Enter Your First Name Here.' />

								<label>First</label>

								<?php
								If (isset($FormSubmitted) && (empty($VehicleOwnerFirstName)))
									{
									print '<p><font color=red>Please Enter Your First Name.</font></p>';
									}
								?>
							</div>

							<div class = "formInputRedText">
								<input type = "text" name = "VehicleOwnerLastName" id = "VehicleOwnerLastName"
									value = "<?php if (isset($VehicleOwnerLastName)) {print $VehicleOwnerLastName ;}?>"
										align = 'left' size = '30' maxlength = '20'
									title = 'Please Enter Your Last Name Here.' />

								<label>Last</label>

								<?php
								If (isset($FormSubmitted) && (empty($VehicleOwnerLastName)))
									{
									print '<p><font color=red>Please Enter Your Last Name.</font></p>';
									}
								?>
							</div>
						</fieldset>


						<!-- End Vehicle Owner Name Section -->
						<!-- Vehicle Owner Address Section -->
						<fieldset class = "formInnerDetailFieldset">
							<legend class = "formLegendRed">
								Your Address
							</legend>

							<fieldset>
								<p>
								You must complete this section to include Address and Contact Telephone Numbers.
								Details here are not added to the website if you indicate further below that Your
								Business Details are Different. If you do not say that Your Business Details are
								Different, then these details may be used and displayed on 'The Wedding Car Hire
								Company' website.<span class = "formInlineRedTxt"> You must add at least one telephone
								number.</span></p>

								<br />
							</fieldset>

							<div class = "formInputBlackText">
								<input type = 'text' name = 'VehicleOwnerAddress1' id = 'VehicleOwnerAddress1'
									value = "<?php if (isset($VehicleOwnerAddress1)) {print $VehicleOwnerAddress1 ;}?>"
										align = 'left' size = '30' maxlength = '50' title = 'Property Name Here.' />

								<label>Property Name</label>
							</div>

							<div class = "formInputBlackText">
								<input type = 'text' name = 'VehicleOwnerAddress2' id = 'VehicleOwnerAddress2'
									value = "<?php if (isset($VehicleOwnerAddress2)) {print $VehicleOwnerAddress2 ;}?>"
										size = '30' maxlength = '3' title = 'Propert Number.' />

								<label>Number</label>
							</div>

							<div class = "formInputRedText">
								<input type = 'text' name = 'VehicleOwnerAddress3' id = 'VehicleOwnerAddress3'
									value = "<?php if (isset($VehicleOwnerAddress3)) {print $VehicleOwnerAddress3 ;}?>"
										size = '30' maxlength = '50' title = 'The Street or Road Name Goes Here.' />

								<label>Street</label>

								<?php
								If (isset($FormSubmitted) && (empty($VehicleOwnerAddress3)))
									{
									print '<p><font color=red>Please Enter Your Street Name.</font></p>';
									}
								?>
							</div>

							<div class = "formInputRedText">
								<input type = 'text' name = 'VehicleOwnerAddress4' id = 'VehicleOwnerAddress4'
									value = "<?php if (isset($VehicleOwnerAddress4)) {print $VehicleOwnerAddress4 ;}?>"
										size = '30' maxlength = '50' title = 'The Town Name Goes Here.' />

								<label>Town</label>

								<?php
								If (isset($FormSubmitted) && (empty($VehicleOwnerAddress4)))
									{
									print '<p><font color=red>Please Enter Your Town Name.</font></p>';
									}
								?>
							</div>

							<div class = "formInputRedText">
								<input type = 'text' name = 'VehicleOwnerAddress5' id = 'VehicleOwnerAddress5'
									value = "<?php if (isset($VehicleOwnerAddress5)) {print $VehicleOwnerAddress5 ;}?>"
										size = '30' maxlength = '12' title = 'Your Counties Please.' />

								<label>County</label>

								<?php
								If (isset($FormSubmitted) && (empty($VehicleOwnerAddress5)))
									{
									print '<p><font color=red>Please Enter Your County Name.</font></p>';
									}
								?>
							</div>

							<div class = "formInputRedText">
								<input type = 'text' name = 'VehicleOwnerAddress6' id = 'VehicleOwnerAddress6'
									value = "<?php if (isset($VehicleOwnerAddress6)) {print $VehicleOwnerAddress6 ;}?>"
										size = '30' maxlength = '10' title = 'Please Enter Your Post Code Here.' />

								<label>Post Code</label>

								<?php
								If (isset($FormSubmitted) && (empty($VehicleOwnerAddress6)))
									{
									print '<p><font color=red>Please Enter Your Post Code.</font></p>';
									}
								?>
							</div>
						</fieldset>
						<!-- End Vehicle Owner Address Section -->
						<!-- Vehicle Owner Telephones -->

						<fieldset>
							<legend class = "formLegendRed">
								Telephone - This is You Not Your Business - This is if We Need to Contact You
							</legend>

							<fieldset>
								<p>
								The telephone numbers supplied here are not published if you have selected the section
								'My Business Address Details are Different From Above' checkbox seen below. If
								telephone numbers are not supplied in that section, it will be presumed that telephone
								numbers added here are those of your business.</p>
							</fieldset>

							<br />

							<div class = "formInputBlackText">
								<input type = 'text' name = 'VehicleOwnerTelephoneLand' id = 'VehicleOwnerTelephoneLand'
									value = "<?php if (isset($VehicleOwnerTelephoneLand)) {print $VehicleOwnerTelephoneLand ;}?>"
									size = '30' maxlength = '15'
									title = 'Your Telephone Number is Required Should We Need to Contact Your.' />

								<label>Land Line</label>
							</div>

							<div class = "formInputBlackText">
								<input type = 'text' name = 'VehicleOwnerTelephoneMobile'
									id = 'VehicleOwnerTelephoneMobile'
									value = "<?php if (isset($VehicleOwnerTelephoneMobile)) {print $VehicleOwnerTelephoneMobile ;}?>"
										size = '30' maxlength = '15'
									title = 'The Mobile Telephone Number is Optional' />

								<label>Mobile</label>

								<?php
								If (isset($FormSubmitted) && (isset($NoTelephoneNumberSupplied)))
									{
									print
										'<p><font color=red>You Have Failed to Supply any Telephone Numbers!</font></p>';
									}
								?>
							</div>
						</fieldset>
					<!-- End Vehicle Owner Telephones -->
					</fieldset>

					<br />
					<!-- End Vehicle Owner Details Section -->
					<!-- Start Business Details Section -->
					<fieldset class = "formOuterDetailFieldset">
						<legend class = "formFieldLegendBlue">
							Business Details
						</legend>
						<!-- Start Business Contact -->
						<fieldset>
							<legend class = "formLegendRed">
								Business Contact
							</legend>

							<div class = "formInputRedText">
								<input type = 'text' name = 'BusinessName' id = 'BusinessName'
									value = "<?php if (isset($BusinessName)) {print $BusinessName ;}?>"
									size = '30' maxlength = '60' title = 'Please Enter Your Business Name Here.' />

								<label>Business Name</label>

								<?php
								If (isset($FormSubmitted) && (empty($BusinessName)))
									{
									print '<p><font color=red>Please Enter Your Business Name.</font></p>';
									}
								?>
							</div>

							<div class = "formInputRedText">
								<input type = 'text' name = 'BusinessWebsite' id = 'BusinessWebsite'
									value = "<?php if (isset($BusinessWebsite)) {print $BusinessWebsite ;}?>"
									size = '30' maxlength = '50' title = 'Please Enter Your Domain Name Here.' />

								<label>Website</label>

								<?php
								If (isset($FormSubmitted) && (empty($BusinessWebsite)))
									{
									print '<p><font color=red>Please Enter Your Domain Name.</font></p>';
									}
								?>
							</div>

							<div class = "formInputRedText">
								<input type = 'text' name = 'BusinessEmail' id = 'BusinessEmail'
									value = "<?php if (isset($BusinessEmail)) {print $BusinessEmail ;}?>"
									size = '30' maxlength = '50'
									title = 'Your Business Email Should Be Entered Here.' />

								<label>Email Not Displayed But Required</label>

								<?php
								If (isset($FormSubmitted) && (empty($BusinessEmail)))
									{
									print '<p><font color=red>Please Enter Your Email Address.</font></p>';
									}
								?>
							</div>

							<br />
							<!-- Optional Addition Business Details if Different From Vehicle Owner Details -->
							<div style = "margin-left: 0em">
								<input type = "checkbox" name = "chkBusinessDifferent" id = "chkBusinessDifferent"
									<?php if( isset( $BusinessDifferent ) && $BusinessDifferent == "on" ) { print "checked"; } ?>
										onclick = "handleClick(this)" />

								<label for = "checkbox">My Business Address Details are Different From Above</label>
								<br>
								<div id = "test"<?php  if (!isset($BusinessDifferent)) {print "style = 'display:none'";}?>>
									<div class = "formInputBlackText">
										<input type = 'text' name = 'BusinessAddress1' id = 'BusinessAddress1'
											value = "<?php  if(empty($BusinessAddress1) && (!empty($VehicleOwnerAddress1)) && (!isset($BusinessDifferent))) {print $VehicleOwnerAddress1;} elseif (!empty($BusinessAddress1)){print $BusinessAddress1;} ?>"
												align = 'left' size = '30' maxlength = '50'
											title = 'If Different to Above Complete this Section' />

										<label>Property Name</label>
									</div>

									<div class = "formInputBlackText">
										<input type = 'text' name = 'BusinessAddress2' id = 'BusinessAddress2'
											value = "<?php  if(empty($BusinessAddress2) && (!empty($VehicleOwnerAddress2)) && (!isset($BusinessDifferent))) {print $VehicleOwnerAddress2;} elseif (!empty($BusinessAddress2)){print $BusinessAddress2;} ?>"
												size = '30' maxlength = '50'
											title = 'If Different to Above Complete this Section' />

										<label>Number</label>
									</div>

									<div class = "formInputBlackText">
										<input type = 'text' name = 'BusinessAddress3' id = 'BusinessAddress3'
											value = "<?php  if(empty($BusinessAddress3) && (!empty($VehicleOwnerAddress3)) && (!isset($BusinessDifferent))) {print $VehicleOwnerAddress3;} elseif (!empty($BusinessAddress3)){print $BusinessAddress3;} ?>"
												size = '30' maxlength = '50'
											title = 'If Different to Above Complete this Section' />

										<label>Street</label>
									</div>

									<div class = "formInputBlackText">
										<input type = 'text' name = 'BusinessAddress4' id = 'BusinessAddress4'
											value = "<?php  if(empty($BusinessAddress4) && (!empty($VehicleOwnerAddress4))  && (!isset($BusinessDifferent))) {print $VehicleOwnerAddress4;} elseif (!empty($BusinessAddress4)){print $BusinessAddress4;} ?>"
												size = '30' maxlength = '50'
											title = 'If Different to Above Complete this Section' />

										<label>Town</label>
									</div>

									<div class = "formInputBlackText">
										<input type = 'text' name = 'BusinessAddress5' id = 'BusinessAddress5'
											value = "<?php  if(empty($BusinessAddress5) && (!empty($VehicleOwnerAddress5))  && (!isset($BusinessDifferent))) {print $VehicleOwnerAddress5;} elseif (!empty($BusinessAddress5)){print $BusinessAddress5;} ?>"
												size = '30' maxlength = '50'
											title = 'If Different to Above Complete this Section' />

										<label>County</label>
									</div>

									<div class = "formInputBlackText">
										<input type = 'text' name = 'BusinessAddress6' id = 'BusinessAddress6'
											value = "<?php  if(empty($BusinessAddress6) && (!empty($VehicleOwnerAddress6)) && (!isset($BusinessDifferent))) {print $VehicleOwnerAddress6;} elseif (!empty($BusinessAddress6)){print $BusinessAddress6;} ?>"
												size = '30' maxlength = '12'
											title = 'If Different to Above Complete this Section' />

										<label>Post Code</label>
									</div>

									<div class = "formInputBlackText">
										<input type = 'text' name = 'BusinessTelephoneLand' id = 'BusinessTelephoneLand'
											value = "<?php  if(empty($BusinessTelephoneLand) && (!empty($VehicleOwnerTelephoneLand))  && (!isset($BusinessDifferent))) {print $VehicleOwnerTelephoneLand;} elseif (!empty($BusinessTelephoneLand)){print $BusinessTelephoneLand;} ?>"
											size = '30' maxlength = '15'
											title = 'If Different to Above Complete this Section' />

										<label>Telephone Land</label>
									</div>

									<div class = "formInputBlackText">
										<input type = 'text' name = 'BusinessTelephoneMobile'
											id = 'BusinessTelephoneMobile'
											value = "<?php  if(empty($BusinessTelephoneMobile) && (!empty($VehicleOwnerTelephoneMobile))  && (!isset($BusinessDifferent))) {print $VehicleOwnerTelephoneMobile;} elseif (!empty($BusinessTelephoneMobile)){print $BusinessTelephoneMobile;} ?>"
												size = '30' maxlength = '15'
											title = 'If Different to Above Complete this Section' />

										<label>Telephone Mobile</label>
									</div>
								</div>
							</div>
						<!-- End Of Optional Business Details -->
						</fieldset>
					</fieldset>

					<br />
					<!-- End of Business Details Section -->
					<!-- Vehicle Details Section -->

					<fieldset class = "formOuterDetailFieldset">
						<legend class = "formFieldLegendBlue">
							Vehicle You are Listing Details - This is Displayed on the Website
						</legend>


						<!-- Basic Vehicle Details Section -->
						<fieldset class = "formInnerDetailFieldset">
							<legend class = "formLegendRed">
								Vehicle Basics
							</legend>

							<fieldset>
								<p>
								The following are details that must be completed. <!-- The section asking for a
								registration number is used as a vehicle reference on this site. Should the vehicle be
								that of a horse and carriage, then some other form of unique reference must be
								supplied. --> Passenger Seats refers to the number of passengers and therefore excludes
								the driver. If the vehicle has occasional seats, then your should mark this section as 4
								- 6 as an example. If no Seat Belts are fitted this should be marked as None. If
								fitted to the rear only, Mark this as rear only.</p>
							</fieldset>

							<br />

							<div class = "formInputRedText">
								<input type = 'text' name = 'VehicleManufacturer'
									id = 'VehicleManufacturer' size = '30' maxlength = '30'
									value = "<?php if (isset($VehicleManufacturer)) {print $VehicleManufacturer ;}?>"
									title = 'You Must Enter the Manufacturer of You Vehicle' />

								<label>Manufacturer</label>

								<?php
								If (isset($FormSubmitted) && (empty($VehicleManufacturer)) && ($FormErrors == TRUE))
									{
									print '<p><font color=red>Please Enter a Vehicle Manufacturer.</font></p>';
									}
								?>
							</div>

							<div class = "formInputRedText">
								<input type = 'text' name = 'VehicleModel' id = 'VehicleModel' size = '30'
									maxlength = '30'
									value = "<?php if (isset($VehicleModel)) {print $VehicleModel  ;}?>"
									title = 'You Must Enter the Make of Your Vehicle.' />

								<label>Model</label>

								<?php
								If (isset($FormSubmitted) && (empty($VehicleModel)) && ($FormErrors == TRUE))
									{
									print '<p><font color=red>Please Enter the Vehicle Model.</font></p>';
									}
								?>
							</div>

							<div class = "formInputRedText">
								<input type = 'text' name = 'VehicleYear' id = 'VehicleYear' size = '30' maxlength = '4'
									value = '<?php if (isset($VehicleYear)) {print $VehicleYear  ;}?>'
									title = 'You Must Enter the Year of Your Vehicle.' />

								<label>Year</label>

								<?php
								If (isset($FormSubmitted) && (empty($VehicleYear)) && ($FormErrors == TRUE))
									{
									print '<p><font color=red>Please Enter the Vehicle Year.</font></p>';
									}
								?>
							</div>

							<?php /*
							
							<div class = "formInputRedText">
								<input type = 'text' name = 'VehicleRegistration'
									id = 'VehicleRegistration' size = '30' maxlength = '10'
									value = "<?php if (isset($VehicleRegistration)) {print $VehicleRegistration  ;}?>"
									title = 'The Registration Number of Your Vehicle is Optional.' />

								<label>Registration</label>
									*/?>
								<?php /*
								If (isset($FormSubmitted) && (empty($VehicleRegistration)) && ($FormErrors == TRUE))
									{
									print
										'<p><font color=red>Please Enter the Vehicle Registration or if Horse and Carriage, other unique Vehicle Reference.</font></p>';
									}
						
							</div>   */ ?>

							<div class = "formInputRedText">
								<input type = 'text' name = 'VehicleExteriorColour'
									id = 'VehicleExteriorColour' size = '30' maxlength = '20'
									value = "<?php if (isset($VehicleExteriorColour)) {print $VehicleExteriorColour ;}?>"
										title = 'You Must Enter the Exterior Colour of Your Vehicle.' />

								<label>Exterior Colour/s</label>

								<?php
								If (isset($FormSubmitted) && (empty($VehicleExteriorColour)) && ($FormErrors == TRUE))
									{
									print
										'<p><font color=red>Please Enter the Vehicle\'s Exterior Colour/s.</font></p>';
									}
								?>
							</div>

							<div class = "formInputRedText">
								<input type = 'text' name = 'VehicleInteriorColour'
									id = 'VehicleInteriorColour' size = '30' maxlength = '20'
									value = "<?php if (isset($VehicleInteriorColour)) {print $VehicleInteriorColour  ;}?>"
										title = 'You Must Enter the Interior Colour of Your Vehicle.' />

								<label>Interior Colour</label>

								<?php
								If (isset($FormSubmitted) && (empty($VehicleInteriorColour)) && ($FormErrors == TRUE))
									{
									print '<p><font color=red>Please Enter the Vehicle\'s Interior Colour.</font></p>';
									}
								?>
							</div>

							<div class = "formInputRedText">
								<input type = 'text' name = 'VehicleInteriorMaterial'
									id = 'VehicleInteriorMaterial' size = '30' maxlength = '20'
									value = "<?php if (isset($VehicleInteriorMaterial)) {print  $VehicleInteriorMaterial  ;}?>"
										title = 'You Must Enter the Interior Fabric of Your Vehicle.' />

								<label>Interior Material</label>

								<?php
								If (isset($FormSubmitted) && (empty($VehicleInteriorMaterial)) && ($FormErrors == TRUE))
									{
									print '<p><font color=red>Please Enter the Vehicle\'s Interior Fabric.</font></p>';
									}
								?>
							</div>

							<div class = "formInputRedText">
								<input type = 'text' name = 'VehiclePassengerSeats'
									id = 'VehiclePassengerSeats' size = '30' maxlength = '10'
									value = "<?php if (isset($VehiclePassengerSeats)) {print $VehiclePassengerSeats  ;}?>"
										title = 'You Must Enter the the Carrying Capacity of You Vehicle.  ' />

								<label>Passenger Seats</label>

								<?php
								If (isset($FormSubmitted) && (empty($VehiclePassengerSeats)) && ($FormErrors == TRUE))
									{
									print
										'<p><font color=red>Please Indicate the Vehicle\'s Passenger Seating Capacity.</font></p>';
									}
								?>
							</div>

							<div class = "formInputRedText">
								<input type = 'text' name = 'VehicleseatBelts'
									value = "<?php if (isset($VehicleseatBelts)) {print $VehicleseatBelts ;}?>"
									id = 'VehicleseatBelts' size = '30' maxlength = '30'
									title = 'You Must Say if Seat Belts are Fitted.' />

								<label>Seat Belts</label>

								<?php
								If (isset($FormSubmitted) && (empty($VehicleseatBelts)) && ($FormErrors == TRUE))
									{
									print '<p><font color=red>Please Say if the Vehicle has Seat Belts.</font></p>';
									}
								?>
							</div>
						</fieldset>

						<br />
						<!-- End of Basic Vehicle Details Section -->
						<!-- Vehicle Description Section -->
						<fieldset class = "formInnerDetailFieldset">
							<legend class = "formLegendRed">
								Describe This Vehicle - The Sales Pitch - About 300 Words
							</legend>

							<fieldset>
								<p>
								From what you have provided so far a fair indication as to how the vehicle looks is
								obvious. However, here you should give a description of the vehicle so that search
								engines have something to list. The content should be unique and specific to the
								vehicle you are listing here. 300 words or more would be most beneficial where this
								may be edited by 'The Wedding Car Hire Company' management before inclusion. More is
								better than not enough. </p>
							</fieldset>

							<br />

							<div class = "formInputRedText">
								<?php
								echo "<textarea name = 'VehicledDescription' id = 'VehicleDescription' rows = '10'
							cols = '50' wrap = 'physical'
							title = 'You should add in the region of 300 to 500 words here as this is what helps sell the vehicle. If the vehicle has a name, include that and perhaps some history.'>"
									. $TextAreaText . "</textarea>";
								?>

								<?php
								If (isset($FormSubmitted) && (empty($VehicleDescription)) && ($FormErrors == TRUE))
									{
									print '<p><font color=red>Please Provide a Full Vehicle Description.</font></p>';
									}
								?>
							</div>
						</fieldset>

						<br />
						<!-- End of Vehicle Description Section -->
						<!-- Services Offered with Vehicle Section -->

						<fieldset class = "formInnerDetailFieldset">
							<legend class = "formLegendRed">
								Service Offered with This Vehicle
							</legend>

							<fieldset>
								<p>
								The Services Offered section may appear as though duplicate information is required.
								This is not the case. It is provide so that prospective clients have a clear
								indication of things such as where the vehicle is located and where it may be viewed.
								This is not necessarily the same. Only enter the town name here.</p>
								<p>
								The working radius is the maximum distance that the vehicle can be expected to travel
								from base central. The charges are to give a prospective client an indication of what
								the charges are and these are based on a from basics. Charges should not exclude
								compulsory additions such as taxes and the like. Champagne Service may be marked with
								a price, on request or Not Available. Attire. The dress code of your business should
								be indicated. As an example, full chauffeur uniform or similar.</p>
							</fieldset>

							<br />

							<div class = "formInputRedText">
								<input type = 'text' name = 'VehicleBasedWhere'
									id = 'VehicleBasedWhere' size = '30' maxlength = '30'
									value = "<?php if (isset($VehicleBasedWhere)) {print $VehicleBasedWhere  ;}?>"
									title = 'Vehicle Base is Where the Vehicle Operates From.' />

								<label>Vehicle Base</label>

								<?php
								If (isset($FormSubmitted) && (empty($VehicleBasedWhere)) && ($FormErrors == TRUE))
									{
									print '<p><font color=red>Please Say Where the Vehicle is Based.</font></p>';
									}
								?>
							</div>

							<div class = "formInputRedText">
								<input type = 'text' name = 'VehicleViewingWhere'
									id = 'VehicleViewingWhere' size = '30' maxlength = '30'
									value = "<?php if (isset($VehicleViewingWhere)) {print $VehicleViewingWhere  ;}?>"
									title = 'Where the Vehicle Car Be Viewed By the Public.' />

								<label>Viewing Location</label>

								<?php
								If (isset($FormSubmitted) && (empty($VehicleViewingWhere)) && ($FormErrors == TRUE))
									{
									print '<p><font color=red>Please Say Where the Vehicle can be Viewed.</font></p>';
									}
								?>
							</div>

							<div class = "formInputRedText">
								<input type = 'text' name = 'VehicleWorkingRadius'
									id = 'VehicleWorkingRadius' size = '30' maxlength = '30'
									value = "<?php if (isset($VehicleWorkingRadius)) {print $VehicleWorkingRadius  ;}?>"
										title = 'Give the Normal Working Radius of Your Vehicle.' />

								<label>Working Radius</label>

								<?php
								If (isset($FormSubmitted) && (empty($VehicleWorkingRadius)) && ($FormErrors == TRUE))
									{
									print
										'<p><font color=red>Please Give the Working Radius of the Vehicle.</font></p>';
									}
								?>
							</div>

							<div class = "formInputRedText">
								<input type = 'text' name = 'WeekendRatesFrom'
									id = 'WeekendRatesFrom' size = '30' maxlength = '30'
									value = "<?php if (isset($WeekendRatesFrom)) {print $WeekendRatesFrom ;}?>"
									title = 'Charges are From.' />

								<label>Weekend Rates From</label>

								<?php
								If (isset($FormSubmitted) && (empty($WeekendRatesFrom)) && ($FormErrors == TRUE))
									{
									print '<p><font color=red>Please Provide an Indication of Charge.</font></p>';
									}
								?>
							</div>

							<div class = "formInputRedText">
								<input type = 'text' name = 'WeekdayRatesFrom'
									id = 'WeekdayRatesFrom' size = '30' maxlength = '30'
									value = "<?php if (isset($WeekdayRatesFrom)) {print $WeekdayRatesFrom  ;}?>"
									title = 'Charges are From.' />

								<label>Weekday Rates From</label>

								<?php
								If (isset($FormSubmitted) && (empty($WeekdayRatesFrom)) && ($FormErrors == TRUE))
									{
									print '<p><font color=red>Please Provide an Indication of Charge.</font></p>';
									}
								?>
							</div>

							<div class = "formInputRedText">
								<input type = 'text' name = 'OffPeakRatesFrom'
									id = 'OffPeakRatesFrom' size = '30' maxlength = '30'
									value = "<?php if (isset($OffPeakRatesFrom)) {print $OffPeakRatesFrom  ;}?>"
									title = 'Charges are From.' />

								<label>Off Peak Rates From</label>

								<?php
								If (isset($FormSubmitted) && (empty($OffPeakRatesFrom)) && ($FormErrors == TRUE))
									{
									print '<p><font color=red>Please Provide an Indication of Charge.</font></p>';
									}
								?>
							</div>

							<div class = "formInputRedText">
								<input type = 'text' name = 'ChampagneService'
									id = 'ChampagneService' size = '30' maxlength = '30'
									value = "<?php if (isset($ChampagneService)) {print $ChampagneService  ;}?>"
									title = 'If You Operate a Champagne Service, Say so Here.' />

								<label>Champagne Service</label>

								<?php
								If (isset($FormSubmitted) && (empty($ChampagneService)) && ($FormErrors == TRUE))
									{
									print '<p><font color=red>Please Give Mention to Champagne Services.</font></p>';
									}
								?>
							</div>

							<div class = "formInputRedText">
								<input type = 'text' name = 'ChauffeurAttire'
									id = 'ChauffeurAttire' size = '30' maxlength = '30'
									value = "<?php if (isset($ChauffeurAttire)) {print $ChauffeurAttire  ;}?>"
									title = 'The Dress Code of Vehicle Drivers.' />

								<label>Chauffeur Attire</label>

								<?php
								If (isset($FormSubmitted) && (empty($ChauffeurAttire)) && ($FormErrors == TRUE))
									{
									print '<p><font color=red>Please Enter the Attire of the Chauffeur.</font></p>';
									}
								?>
							</div>
						</fieldset>

						<br />


						<!-- Hire Available For -->
						<!-- Vehicle License Type -->

						<fieldset class = "formInnerDetailFieldset">
							<legend class = "formLegendRed">
								Hire Available For
							</legend>

							<fieldset>
								<p>
								The Hire For section is of three parts. It is possible that due to local licensing or
								other legal reasons the vehicle may not be used for anything other than weddings where
								generally in the case of historic or private light goods vehicles, this is the case.
								In the case of modern vehicles, a hire license is often part of the vehicle and this
								you should say. Indicate your license type where applicable. One or more may be
								selected.</p>
								<p>
								Work Type is the forms of work that the vehicle owner is prepared to undertake with
								the vehicle being listed. One or more may be selected. </p>
								<p>
								The Counties Section are the Counties where it is considered reasonable for the
								vehicle to travel to and from. If it is considered that an excessive number of
								counties have been checked by the user of this service, the management of 'The Wedding
								Car Hire Company' will limit these to what it feels as being both appropriate and or
								reasonable where this may lead to you not being listed in the best counties for your
								operational location. Please be realistic here where this should be in relation the
								radius covered!</p>
							</fieldset>

							<br />

							<div id = "LicencePanel">
								<fieldset class = "formInnerDetailFieldset">
									<legend class = "formLegendRed">
										Authority Licence - Only Wedding Hire Does Not Require a Licence
									</legend>

									<div style = "margin-left: 0em" class = "checkboxSpacer">
										<input type = "checkbox" name = "HireLicenceNone" id = "HireLicenceNone"
											value = 'No License'<?php if(isset($HireLicenceNone)){print 'checked="checked"';}?> />

										<label for = "checkbox">None</label>

										<input type = "checkbox" name = "HireLicencePsv" id = "HireLicencePsv"
											value = 'PSV'<?php if(isset($HireLicencePsv)){print 'checked="checked"';}?> />

										<label for = "checkbox">PSV</label>

										<input type = "checkbox" name = "HireLicencePrivateHire"
											id = "HireLicencePrivateHire" value = "Private Hire"
											<?php if(isset($HireLicencePrivateHire)){print 'checked="checked"';}?> />

										<label for = "checkbox">Private Hire</label>

										<input type = "checkbox" name = "HireLicenceOther"
											id = "HireLicenceOther" value = "Other Type"
											<?php if(isset($HireLicenceOther)){print 'checked="checked"';}?> />

										<label for = "checkbox">Other</label>
									</div>
								</fieldset>

								<?php
								If (isset($FormSubmitted) && ($HireLicenceCheckError == TRUE))
									{
									print '<p><font color=red>Please Select at Least One License Option!</font></p>';
									}
								?>
							</div>

							<div style = "margin-left: 0em">

								<!-- Work Type Undertaken Section -->
								<fieldset class = "formInnerDetailFieldset">
									<legend class = "formLegendRed">
										Work Type
									</legend>

									<div style = "margin-left: 0em" class = "checkboxSpacer">
										<input type = "checkbox" name = "HireForWedding" value = "Weddings"
											id = "HireForWedding"
											<?php if(isset($HireForWedding)){print 'checked="checked"';}?> />

										<label for = "checkbox">Weddings</label>

										<input type = "checkbox" name = "HireForPromo" id = "HireForPromo"
											value = "Promotional"<?php if(isset($HireForPromo)){print 'checked="checked"';}?> />

										<label for = "checkbox">Promo</label>

										<input type = "checkbox" name = "HireForFilm" id = "HireForFilm" value = "Film"
											<?php if(isset($HireForFilm)){print 'checked="checked"';}?> />

										<label for = "checkbox">Film</label>

										<input type = "checkbox" name = "HireForOther" id = "HireForOther"
											value = "Other Occasions"
											<?php if(isset($HireForOther)){print 'checked="checked"';}?> />

										<label for = "checkbox">Other</label>
									</div>
								</fieldset>

								<?php
								If (isset($FormSubmitted) && ($HireForPurposeCheckError == TRUE))
									{
									print '<p><font color=red>Please Select at Least One Form of Hire!</font></p>';
									}
								?>
							</div>
							<!-- End Work Type Undertaken Section -->

							<!-- Counties Catered For Section-->
							<div style = "margin-left: 0em">
								<fieldset class = "formInnerDetailFieldset">
									<legend class = "formLegendGrn">
										Counties South East
									</legend>

									<div style = "margin-left: 0em" class = "checkboxSpacer">
										<table style = "font-size: 13px;">
											<tr>
												<td>
													<input type = "checkbox" name = "HireInBeds"
														value = "Bedfordshire" id = "HireInBeds"
														<?php if(isset($HireInBeds)){print 'checked="checked"';}?> />

													<label for = "checkbox">Beds</label>
												</td>

												<td>
													<input type = "checkbox" name = "HireInBerks"
														value = "Berkshire" id = "HireInBerks"
														<?php if(isset($HireInBerks)){print 'checked="checked"';}?> />

													<label for = "checkbox">Berks</label>
												</td>

												<td>
													<input type = "checkbox" name = "HireInBucks"
														value = "Buckinghamshire" id = "HireInBucks"
														<?php if(isset($HireInBucks)){print 'checked="checked"';}?> />

													<label for = "checkbox">Bucks</label>
												</td>

												<td>
													<input type = "checkbox" name = "HireInCamb"
														value = "Cambridgeshire" id = "HireInCamb"
														<?php if(isset($HireInCamb)){print 'checked="checked"';}?> />

													<label for = "checkbox">Camb</label>
												</td>

												<td>
													<input type = "checkbox" name = "HireInEastSussex"
														value = "East Sussex" id = "HireInEastSussex"
														<?php if(isset($HireInEastSussex)){print 'checked="checked"';}?> />

													<label for = "checkbox">East Sussex</label>
												</td>
											</tr>

											<tr>
												<td>
													<input type = "checkbox" name = "HireInEssex"
														value = "Essex" id = "HireInEssex"
														<?php if(isset($HireInEssex)){print 'checked="checked"';}?> />

													<label for = "checkbox">Essex</label>
												</td>

												<td>
													<input type = "checkbox" name = "HireInHants"
														value = "Hampshire" id = "HireInHants"
														<?php if(isset($HireInHants)){print 'checked="checked"';}?> />

													<label for = "checkbox">Hants</label>
												</td>

												<td>
													<input type = "checkbox" name = "HireInHerts"
														value = "Hertfordshire" id = "HireInHerts"
														<?php if(isset($HireInHerts)){print 'checked="checked"';}?> />

													<label for = "checkbox">Herts</label>
												</td>

												<td>
													<input type = "checkbox" name = "HireInKent"
														value = "Kent" id = "HireInKent"
														<?php if(isset($HireInKent)){print 'checked="checked"';}?> />

													<label for = "checkbox">Kent</label>
												</td>

												<td>
													<input type = "checkbox" name = "HireInLondon"
														value = "London" id = "HireInLondon"
														<?php if(isset($HireInLondon)){print 'checked="checked"';}?> />

													<label for = "checkbox">London</label>
												</td>
											</tr>

											<tr>
												<td>
													<input type = "checkbox" name = "HireInNorfolk"
														value = "Norfolk" id = "HireInNorfolk"
														<?php if(isset($HireInNorfolk)){print 'checked="checked"';}?> />

													<label for = "checkbox">Norfolk</label>
												</td>

												<td>
													<input type = "checkbox" name = "HireInOxon"
														value = "Oxfordshire" id = "HireInOxon"
														<?php if(isset($HireInOxon)){print 'checked="checked"';}?> />

													<label for = "checkbox">Oxon</label>
												</td>

												<td>
													<input type = "checkbox" name = "HireInSuffolk"
														value = "Suffok" id = "HireInSuffolk"
														<?php if(isset($HireInSuffolk)){print 'checked="checked"';}?> />

													<label for = "checkbox">Suffolk</label>
												</td>

												<td>
													<input type = "checkbox" name = "HireInSurrey"
														value = "Surrey" id = "HireInSurrey"
														<?php if(isset($HireInSurrey)){print 'checked="checked"';}?> />

													<label for = "checkbox">Surrey</label>
												</td>

												<td>
													<input type = "checkbox" name = "HireInWestSussex"
														value = "West Sussex" id = "HireInWestSussex"
														<?php if(isset($HireInWestSussex)){print 'checked="checked"';}?> />

													<label for = "checkbox">West Sussex</label>
												</td>
											</tr>
										</table>
									</div>
								</fieldset>

								<fieldset>
									<legend class = "formLegendGrn">
										Others Due
									</legend>

									<div style = "margin-left: 0em" class = "checkboxSpacer">
										<input type = "checkbox" name = "HireInOther" value = "Hire In Other Counties"
											id = "HireInOther"<?php if(isset($HireInOther)){print 'checked="checked"';}?> />

										<label for = "checkbox">Other</label>
									</div>
								</fieldset>

								<?php
								If (isset($FormSubmitted) && ($HireInCountiesCheckError == TRUE))
									{
									print '<p><font color=red>Please Select at Least One County!</font></p>';
									}
								?>
							</div>
						</fieldset>

						<br />

						<!-- End of Counties Catered for Section -->

						<!-- Vehicle Image Upload Section -->

						<fieldset>
							<legend class = "formLegendRed">
								Image Upload Section - Only Quality Images Will Be Used on This Website
							</legend>

							<fieldset class = "formInnerDetailFieldset">
								<p>
								Special note should be taken here. The intention of 'The Wedding Car Hire Company'
								website is to provide a high quality service and experience for all users. This can
								only be achieved by the inclusion of superior website management and of quality
								material where images should reflect this. </p>
								<p>
								You have the opportunity at this point to upload as many as ten images. Management may
								decide not to use all where, the best will be selected for inclusion. The images must
								be in JPEG format only as this website will only permit this file type to be upload.
								The maximum width should be 1500 pixels of usable content. Management are happy to
								edit images without charge so it would be beneficial to provide images without prior
								manipulation should you be less than experienced in doing so. </p>
								<p>
								The images supplied ought to display the vehicle well and must be a true
								representation of the vehicle as it is now. Ideally displaying front, back, side and
								interior. The internet is a very graphic medium where a high quality representation of
								a product sells that product. Further, quality images cut down on the number of
								potential vehicle viewings prior to booking transportation.</p>
								<p>
								Please note that you must upload not less than four images.</p>
							</fieldset>

							<br />

							<fieldset>
								<legend class = "formLegendRed">
									Not Less Than 1200 pixels Wide Please - Jpeg Format Only
								</legend>
								<p>
								Image 01:

								<input type = "file" size = "35" name = "ImageFile01" id = "ImageFile01"
									title = 'Images Should be of JPEG format and not less that 1200px wide. Poor Quality Images Will Not Be Used.' /></p>
								<p>
								Image 02:

								<input type = "file" size = "35" name = "ImageFile02" id = "ImageFile02"
									title = 'Images Should be of JPEG format and not less that 1200px wide. Poor Quality Images Will Not Be Used.' /></p>
								<p>
								Image 03:

								<input type = "file" size = "35" name = "ImageFile03" id = "ImageFile03"
									title = 'Images Should be of JPEG format and not less that 1200px wide. Poor Quality Images Will Not Be Used.' /></p>
								<p>
								Image 04:

								<input type = "file" size = "35" name = "ImageFile04" id = "ImageFile04"
									title = 'Images Should be of JPEG format and not less that 1200px wide. Poor Quality Images Will Not Be Used.' /></p>
								<p>
								Image 05:

								<input type = "file" size = "35" name = "ImageFile05" id = "ImageFile05"
									title = 'Images Should be of JPEG format and not less that 1200px wide. Poor Quality Images Will Not Be Used.' /></p>
								<p>
								Image 06:

								<input type = "file" size = "35" name = "ImageFile06" id = "ImageFile06"
									title = 'Images Should be of JPEG format and not less that 1200px wide. Poor Quality Images Will Not Be Used.' /></p>
								<p>
								Image 07:

								<input type = "file" size = "35" name = "ImageFile07" id = "ImageFile07"
									title = 'Images Should be of JPEG format and not less that 1200px wide. Poor Quality Images Will Not Be Used.' /></p>
								<p>
								Image 08:

								<input type = "file" size = "35" name = "ImageFile08" id = "ImageFile08"
									title = 'Images Should be of JPEG format and not less that 1200px wide. Poor Quality Images Will Not Be Used.' /></p>
								<p>
								Image 09:

								<input type = "file" size = "35" name = "ImageFile09" id = "ImageFile09"
									title = 'Images Should be of JPEG format and not less that 1200px wide. Poor Quality Images Will Not Be Used.' /></p>
								<p>
								Image 10:

								<input type = "file" size = "35" name = "ImageFile10" id = "ImageFile10"
									title = 'Images Should be of JPEG format and not less that 1200px wide. Poor Quality Images Will Not Be Used.' /></p>
							</fieldset>

							<?php
							If (isset($FormSubmitted) && ($ImageUploadCountCheckError == TRUE))
								{
								print '<p><font color=red>Please Supply at Leat Four Quality Images!</font></p>';
								}
							?>
						</fieldset>
					</fieldset>

					<br />
					<!-- End of Vehicle Details Section -->

					<!-- Help Us Help Other Optional Dropdown -->
					<fieldset class = "formOuterDetailFieldset">
						<legend class = "formFieldLegendBlue">
							Help Us To Help You And Others
						</legend>
						<p>
						The Wedding Car Hire Company strive to provide a superior service and improve this website at
						all times. If you think that you could help in this respect, add your comments either from a
						vehicle supplier point of view or from a customer viewpoint, adding comments helps us where
						this can only add to a better site. Help Us, Help You and our Customers.</p>
						<!-- Optional Addition Business Details if Different From Vehicle Owner Details -->
						<div style = "margin-left: 2em" class = "checkboxSpacer">
							<input type = "checkbox" name = "HelpSectionDropdown" id = "HelpSectionDropdown"
								<?php if( isset( $chkHelpSectionDropdown ) && $chkHelpSectionDropdown == "on" ) { print "checked"; } ?>
									onclick = "handleClick2(this)" />

							<label for = "checkbox">I Would Like To Add Comments About This Site</label>
							<br>
							<div id = "test2"<?php  if (!isset($chkHelpSectionDropdown)) {print "style = 'display:none'";}?>>
								<p class = "formAddCommentText">
								Could We Improve this Site From a Vehicle Supplier Point of View - Comments Please
										</p>

								<div style = "margin-left: 0em">
									<textarea name = 'VehicleSupplierComments' id = 'VehicleSupplierComments' rows = '6'
										cols = '50' wrap = 'physical'></textarea>
								</div>
								<p class = "formAddCommentText">
								Could We Improve this Site From a Potential Customer Point of View - Comments Please
										</p>

								<div style = "margin-left: 0em">
									<textarea name = 'VehicleCustomerComments' id = 'VehicleCustomerComments' rows = '6'
										cols = '50' wrap = 'physical'></textarea>
								</div>
							</div>
						</div>
					<!-- End Of Optional Business Details -->
					</fieldset>

					<br />
					<!-- Add Another Vehicle Section -->
					<fieldset class = "formOuterDetailFieldset">
						<legend class = "formFieldLegendGrn">
							Would You Like to Add Another Vehicle After this One
						</legend>
						<p>
						If would would like to add further vehicles to 'The Wedding Car Hire Company' website, feel
						free to do so. We don't charge for this service. If you check the box here, it will save you
						adding a great deal of information already provide.</p>

						<div style = "margin-left: 2em" class = "checkboxSpacer">
							<input type = 'checkbox' name = 'AddAnotherVehicle' value = 'true.' class = "checkboxSpacer"
								<?php if(isset($AddAnotherVehicle)){print 'checked="checked"';}?>
								title = 'If You Wish to Add Additional Vehicle to the Site, Check this Box.'>
							<label for = "checkbox" class = "formAddAnotherVehicle">Check to Add Another Vehicle</label>
						</div>
					</fieldset>
					<!-- End Add Another Vehicle Section -->

					<!-- Send Form -->

					<input type = 'hidden' name = 'FormSubmitted' value = 'true' />
					<p>
					<?php /*
	   
	   require_once('recaptchalib.php');
	   
	   // Get a key from https://www.google.com/recaptcha/admin/create
	   $publickey = "6Lde0MUSAAAAAO0tbgGN3w64qPxOIJ60Wtz5G2yZ ";
	   $privatekey = "6Lde0MUSAAAAAOPIhR4eVYFaJyiW75XTcam_AQSD";
	   
	   # the response from reCAPTCHA
	   $resp = null;
	   # the error code from reCAPTCHA, if any
	   $error = null;
	   
	   # was there a reCAPTCHA response?
	   if ($_POST["recaptcha_response_field"]) {
	   $resp = recaptcha_check_answer ($privatekey,
									  $_SERVER["REMOTE_ADDR"],
									  $_POST["recaptcha_challenge_field"],
									  $_POST["recaptcha_response_field"]);
	   
	   if ($resp->is_valid) {
			  echo "You got it!";
	   } else {
			  # set the error code so that we can display it
			  $error = $resp->error;
	   }
	   }
	   echo recaptcha_get_html($publickey, $error);  */
					?>
					<input type = "submit" name = "VehicleSubmitForm" value = "Submit"></p>
				</fieldset>
			</form>
		</div>
		<!-- End of Form for Vehicle Submission -->

<?php
		}
?>

<?php
	}
?>
<?php
function check_add_vehicle_details_form()
	{
?>

	<script>
		function validateFormHireForWhat()
			{
			var inputs = document.forms["VehicleSubmitForm"].getElementsByTagName("input");

			for (var i = 0; i < inputs.length; i++)
				{
				if (inputs[i].type == "checkbox" && inputs[i].name.indexOf("HireFor") == 0 && inputs[i].checked)
					return true;
				}

			alert(
				"Please Say What the Vehicle Can Be Hired For! You May Include Just One or All of the Choices.\n\nIn the Case of Wedding Car Hire, You are Generally not Required to have a License. For Prom Travel You Will Require a Local Authority License. Film Work, Generally No Licence is Required except for the Carriage of Passengers.\n\nIn all Events, Public Liability Insurance is Required.\n\nRemain Legal and Feel Good about Doing So!");
			return false;
			}
	</script>

	<script>
		function validateFormCheckHireIn()
			{
			var inputs = document.forms["VehicleSubmitForm"].getElementsByTagName("input");

			for (var i = 0; i < inputs.length; i++)
				{
				if (inputs[i].type == "checkbox" && inputs[i].name.indexOf("HireIn") == 0 && inputs[i].checked)
					return true;
				}

			alert(
				"Please Say Which Counties the Vehicle is Offered For Hire In! You can select as many as you like or just one.");
			return false;
			}
	</script>

	<script type = "text/javascript">
	<!--
	function checkFileUploads()
	{
	var img01=document.getElementById("ImageFile01").value;
	var img02=document.getElementById("ImageFile02").value;
	var img03=document.getElementById("ImageFile03").value;
	var img04=document.getElementById("ImageFile04").value;
	var img05=document.getElementById("ImageFile05").value;
	var img06=document.getElementById("ImageFile06").value;
	var img07=document.getElementById("ImageFile07").value;
	var img08=document.getElementById("ImageFile08").value;
	var img09=document.getElementById("ImageFile09").value;
	var img10=document.getElementById("ImageFile10").value;
	var countr = 0;
	var alerttxt="";
	var submitOK="true";
	
	if (img01.length > 5) countr += 1;
	if (img02.length > 5) countr += 1;
	if (img03.length > 5) countr += 1;
	if (img04.length > 5) countr += 1;
	if (img05.length > 5) countr += 1;
	if (img06.length > 5) countr += 1;
	if (img07.length > 5) countr += 1;
	if (img08.length > 5) countr += 1;
	if (img09.length > 5) countr += 1;
	if (img10.length > 5) countr += 1;
	
	if (countr < 4)
		{
		alert("You Must Submit Not Less than Four High Quality JPEG Images Files!");
		return false;
		}
	
	}
	
	// -->
	</script>

	<script>
		function handleClick(chkBox)
			{
			var div = document.getElementById("test");
			div.style.display = (chkBox.checked) ? "block" : "none";
			}
	</script>

	<script>
		function handleClick2(chkBox2)
			{
			var div = document.getElementById("test2");
			div.style.display = (chkBox2.checked) ? "block" : "none";
			}
	</script>

	<script language = "JavaScript" type = "text/javascript">
	<!--
	function validateForm ()
	{ 
	// see http://www.thesitewizard.com/archive/validation.shtml
	// for an explanation of this script and how to use it on your
	// own website
	
	// ** START **
	if (VehicleSubmitForm.VehicleOwnerFirstName.value == "") {
	
	VehicleSubmitForm.VehicleOwnerFirstName.focus();
	alert( "Please Enter Your First Name." );
	return false ;
	}
	
	if (VehicleSubmitForm.VehicleOwnerLastName.value == "") {
	
	VehicleSubmitForm.VehicleOwnerLastName.focus();
	alert( "Please Enter Your Last Name." );
	return false ;
	}
	
	if (VehicleSubmitForm.VehicleOwnerAddress3.value == "") {
	
	VehicleSubmitForm.VehicleOwnerAddress3.focus();
	alert( "Please Enter Your Postal Road." );
	return false ;
	} 
	
	
	if (VehicleSubmitForm.VehicleOwnerAddress4.value == "") {
	
	VehicleSubmitForm.VehicleOwnerAddress4.focus();
	alert( "Please Enter Your Postal Town." );
	return false ;
	}
	
	if (VehicleSubmitForm.VehicleOwnerAddress5.value == "") {
	
	VehicleSubmitForm.VehicleOwnerAddress5.focus();
	alert( "Please Enter Postal County." );
	return false ;
	}
	
	if (VehicleSubmitForm.VehicleOwnerAddress6.value == "") {
	
	VehicleSubmitForm.VehicleOwnerAddress6.focus();
	alert( "Please Enter Your Post Code." );
	return false ;
	}    
	
	if (VehicleSubmitForm.BusinessName.value == "") {
	
	VehicleSubmitForm.BusinessName.focus();
	alert( "Please Enter Your Business Name." );
	return false ;
	}
	
	if (VehicleSubmitForm.BusinessWebsite.value == "") {
	
	VehicleSubmitForm.BusinessWebsite.focus();
	alert( "Please Enter Your Website Address." );
	return false ;
	}
	
	
	if (VehicleSubmitForm.BusinessEmail.value.length == 0)
		  {
		  alert("Please enter your e-mail address.")
		  VehicleSubmitForm.BusinessEmail.email.focus()
		  return false
		  }
	
	  if (VehicleSubmitForm.BusinessEmail.value.indexOf("@") == -1)
		  {
		  alert("Please enter a valid e-mail address.");
		  VehicleSubmitForm.BusinessEmail.focus();
		  return false;
		  }
	
	{
	var x=document.forms["VehicleSubmitForm"]["BusinessEmail"].value
	var atpos=x.indexOf("@");
	var dotpos=x.lastIndexOf(".");
	if (atpos<1 || dotpos<atpos+2 || dotpos+2>=x.length)
	{
	alert("Not a valid e-mail address");
	return false;
	}
	}
	
	if (VehicleSubmitForm.VehicleManufacturer.value == "") {
	
	VehicleSubmitForm.VehicleManufacturer.focus();
	alert( "Please Enter Your Vehicle Manufacturer." );
	return false ;
	}
	
	
	if (VehicleSubmitForm.VehicleModel.value == "") {
	
	VehicleSubmitForm.VehicleModel.focus();
	alert( "Please Enter Your Vehicle Model." );
	return false ;
	}
	
	
	if (VehicleSubmitForm.VehicleYear.value == "") {
	
	VehicleSubmitForm.VehicleYear.focus();
	alert( "Please Enter Your Vehicle Year." );
	return false ;
	}
	
	
	if (VehicleSubmitForm.VehicleExteriorColour.value == "") {
	
	VehicleSubmitForm.VehicleExteriorColour.focus();
	alert( "Please Enter Your Vehicle Vehicle Exterior Colour." );
	return false ;
	}
	
	if (VehicleSubmitForm.VehicleInteriorColour.value == "") {
	
	VehicleSubmitForm.VehicleInteriorColour.focus();
	alert( "Please Enter Your Vehicle Vehicle Interior Colour." );
	return false ;
	}
	
	if (VehicleSubmitForm.VehicleInteriorMaterial.value == "") {
	
	VehicleSubmitForm.VehicleInteriorMaterial.focus();
	alert( "Please Enter Your Vehicle Vehicle Interior Material." );
	return false ;
	}
	
	if (VehicleSubmitForm.VehiclePassengerSeats.value == "") {
	
	VehicleSubmitForm.VehiclePassengerSeats.focus();
	alert( "Please Enter Your Vehicle Passenger Seating Capacity." );
	return false ;
	}
	
	if (VehicleSubmitForm.VehicleseatBelts.value == "") {
	
	VehicleSubmitForm.VehicleseatBelts.focus();
	alert( "Please Indicate if Seat Belts are Fitted." );
	return false ;
	}
	
	if (VehicleSubmitForm.VehicleDescription.value == "") {
	
	VehicleSubmitForm.VehicleDescription.focus();
	alert( "Please Enter a Vehicle Description." );
	return false ;
	}
	
	if (VehicleSubmitForm.VehicleBasedWhere.value == "") {
	
	VehicleSubmitForm.VehicleBasedWhere.focus();
	alert( "Please Say Where the Vehicle is Based." );
	return false ;
	}
	
	if (VehicleSubmitForm.VehicleViewingWhere.value == "") {
	
	VehicleSubmitForm.VehicleViewingWhere.focus();
	alert( "Please Say Where the Vehicle May Be Viewed." );
	return false ;
	}
	
	if (VehicleSubmitForm.VehicleWorkingRadius.value == "") {
	
	VehicleSubmitForm.VehicleWorkingRadius.focus();
	alert( "Please Indicate the Working Radious of this Vehicle." );
	return false ;
	}
	
	if (VehicleSubmitForm.WeekendRatesFrom.value == "") {
	
	VehicleSubmitForm.WeekendRatesFrom.focus();
	alert( "Please Suggest What Your Weekend Rates Start From." );
	return false ;
	}
	
	if (VehicleSubmitForm.WeekdayRatesFrom.value == "") {
	
	VehicleSubmitForm.WeekdayRatesFrom.focus();
	alert( "Please Suggest What Your Weekday Rates Start From." );
	return false ;
	}
	
	if (VehicleSubmitForm.OffPeakRatesFrom.value == "") {
	
	VehicleSubmitForm.OffPeakRatesFrom.focus();
	alert( "Please Suggest What Your Off Peak Rates Start From." );
	return false ;
	}
	
	if (VehicleSubmitForm.ChampagneService.value == "") {
	
	VehicleSubmitForm.ChampagneService.focus();
	alert( "If You Offer a Champagne Service Provide the Charge or Say None or Not Applicable." );
	return false ;
	}
	
	if (VehicleSubmitForm.ChauffeurAttire.value == "") {
	
	VehicleSubmitForm.ChauffeurAttire.focus();
	alert( "Please Indicate the Dress Code of Vehicle Drivers." );
	return false ;
	}
	
	
	
	
	  
	
	
	
	// ** END **
	return true ;
	}
	//-->

	</script>

	<script language = "JavaScript" type = "text/javascript">
		function validateFormCheckBoxes()
			{
			var inputs = document.forms["VehicleSubmitForm"].getElementsByTagName("input");

			for (var i = 0; i < inputs.length; i++)
				{
				if (inputs[i].type == "checkbox" && inputs[i].name.indexOf("HireLicence") == 0 && inputs[i].checked)
					return true;
				}

			alert(
				"Please Indicate if Any Licence is Held for the Purpose of Hire to the Public! For the Purpose of Weddings, You Generally Do Not Require a License. In the Case of Prom Travel, Generally You Do Require a Licence.\n\nIn All Cases You Do Require a Public Liability Insurance for the Carriage of Passengers. If in Doubt, Do Check with Your Local Authories and Insurance Company.\n\nStay Legal.");
			return false;
			}
	</script>

	<script language = "JavaScript" type = "text/javascript">
		function validator()
			{
			if (!validateForm())
				{
				return false;
				} // Cannot continue

			if (!validateFormCheckBoxes())
				{
				return false;
				} // Cannot continue

			if (!validateFormHireForWhat())
				{
				return false;
				} // Cannot continue

			if (!validateFormCheckHireIn())
				{
				return false;
				} // Cannot continue

			if (!checkFileUploads())
				{
				return false;
				}        // Cannot continue

			return true; // All tests passed
			}
		//
	</script>

<?php
	;
	}

